
#ifndef _algorithm_h
#define _algorithm_h


#include "stdio.h"


#ifdef __cplusplus
extern "C"
{
#endif

//utility
int alg_data_generate_positive(int data[], int size, int max);
int alg_data_generate_mixed(int data[], int size, int max);
int alg_data_print(const int data[], int size);

//misc
int max_sequence_sum(const int data[], int size);
int alg_gcd(int a, int b);

//sort
void insert_sort(int data[], int size);
void shell_sort(int data[], int data_size, int inc[], int inc_size);


#ifdef __cplusplus
}
#endif


#endif //algorithm

